home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / src / Viewperf5.1src.lha / Viewperf5.1 / viewperf / triF.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-04  |  18.7 KB  |  460 lines

  1. #ifdef WIN32
  2. #include <windows.h>
  3. #endif
  4. #include <GL/gl.h>
  5. #include "viewperf.h"
  6. #include "vpDefine.h"
  7.  
  8. void FUNCTION(struct ThreadBlock *tb) {
  9.         int polyi,verti;
  10.     int numverts;
  11.     int polycount = tb->np;
  12.         GLenum mode = tb->mode;
  13. #ifdef BATCH
  14.         int groupi;
  15.         int batchi;
  16.         int leftoveri;
  17.         int batchcount = tb->batchnum;
  18.         int groupcount = tb->batchgroups;
  19.         int leftovercount = tb->batchleftovers;
  20. #endif
  21. #ifdef EXTERNAL
  22.         GLenum capability = tb->capability;
  23.         void (*lExternfunc)(GLenum) = tb->externfunc;
  24. #endif
  25.     int *vertindex;
  26. #ifdef BY_TWO
  27.     int *startvertindex;
  28. #endif
  29.  
  30.     struct vector *pvert=tb->vert;
  31.     struct plygon *pply=tb->ply;
  32.  
  33. #ifndef FUNCTION_CALLS
  34. #ifdef WIN32
  35.         void (APIENTRY *glVertex3fvP)(const GLfloat *);
  36. #else
  37.         void (*glVertex3fvP)(const GLfloat *);
  38. #endif
  39. #endif
  40.  
  41.  
  42. #if defined(FACET_NORM) || defined(VERT_NORM)
  43.     struct vector *pvnorm=tb->vnorm;
  44. #ifndef FUNCTION_CALLS
  45. #ifdef WIN32
  46.         void (APIENTRY *glNormal3fvP)(const GLfloat *);
  47. #else
  48.         void (*glNormal3fvP)(const GLfloat *);
  49. #endif
  50. #endif  /* ifndef FUNCTION_CALLS */
  51. #endif
  52.  
  53.  
  54. #if defined(FACET_COLOR) || defined(VERT_COLOR)
  55.     struct colorvector *pvcolor=tb->vcolor;
  56. #ifndef FUNCTION_CALLS
  57. #ifdef WIN32
  58.         void (APIENTRY *glColorP)(const GLfloat *);
  59. #else
  60.         void (*glColorP)(const GLfloat *);
  61. #endif
  62. #endif  /* ifndef FUNCTION_CALLS */
  63. #endif
  64.  
  65.  
  66. #ifdef TEXTURE
  67.     struct vector *ptexture=tb->texture;
  68. #ifndef FUNCTION_CALLS
  69. #ifdef WIN32
  70.         void (APIENTRY *glTexCoord2fvP)(const GLfloat *);
  71. #else
  72.         void (*glTexCoord2fvP)(const GLfloat *);
  73. #endif
  74.         glTexCoord2fvP = glTexCoord2fv;
  75. #endif  /* ifndef FUNCTION_CALLS  */
  76. #endif
  77.  
  78.  
  79. #ifndef FUNCTION_CALLS
  80. #if defined(FACET_COLOR) || defined(VERT_COLOR)
  81.         glColorP = tb->ColorP;
  82. #endif
  83. #if defined(FACET_NORM) || defined(VERT_NORM)
  84.         glNormal3fvP = glNormal3fv;
  85. #endif
  86.         glVertex3fvP = glVertex3fv;
  87. #endif  
  88.  
  89.  
  90.  
  91. #ifdef BATCH
  92.         polyi = polycount;
  93.         for(groupi=groupcount-1;groupi>=0;groupi--) {
  94.                 glBegin(mode);
  95.                 for(batchi=batchcount-1;batchi>=0;batchi--) {
  96.                 polyi--;
  97. #else
  98.         for(polyi=polycount-1;polyi>=0;polyi--) {
  99. #endif
  100.         numverts = pply[polyi].numverts;
  101.         vertindex = pply[polyi].index;
  102. #ifdef BY_TWO
  103.         startvertindex = vertindex;
  104. #endif
  105. #ifdef EXTERNAL
  106.                 lExternfunc(capability);
  107. #endif
  108. #if    defined(FACET_COLOR) && !defined(FUNCTION_CALLS)
  109.                 (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  110. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  111.                 glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  112. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  113.                 glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  114. #endif
  115. #if    defined(FACET_NORM) && !defined(FUNCTION_CALLS)
  116.                 (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  117. #elif  defined(FACET_NORM) &&  defined(FUNCTION_CALLS)
  118.                 glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  119. #endif
  120. #ifndef BATCH
  121.                 glBegin(mode);
  122. #endif
  123. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  124.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  125. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  126.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  127. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  128.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  129. #endif
  130. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  131.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  132. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  133.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  134. #endif
  135. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  136.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  137. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  138.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  139. #endif
  140. #ifdef FUNCTION_CALLS
  141.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  142. #else
  143.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  144. #endif
  145.  
  146. #ifdef BY_TWO
  147.             vertindex++;
  148.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  149.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  150.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  151.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  152.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  153.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  154.   #endif   
  155.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  156.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  157.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  158.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  159.   #endif   
  160.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  161.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  162.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  163.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  164.   #endif   
  165.   #ifdef FUNCTION_CALLS 
  166.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  167.   #else 
  168.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  169.   #endif   
  170. #else
  171.             vertindex++;
  172. #endif
  173.  
  174. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  175.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  176. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  177.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  178. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  179.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  180. #endif   
  181. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  182.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  183. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  184.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  185. #endif   
  186. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  187.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  188. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  189.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  190. #endif   
  191. #ifdef FUNCTION_CALLS 
  192.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  193. #else 
  194.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  195. #endif   
  196.  
  197. #ifdef BY_TWO
  198.             vertindex++;
  199.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  200.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  201.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  202.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  203.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  204.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  205.   #endif   
  206.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  207.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  208.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  209.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  210.   #endif   
  211.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  212.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  213.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  214.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  215.   #endif   
  216.   #ifdef FUNCTION_CALLS 
  217.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  218.   #else 
  219.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  220.   #endif   
  221. #else
  222.             vertindex++;
  223. #endif
  224.  
  225. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  226.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  227. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  228.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  229. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  230.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  231. #endif   
  232. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  233.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  234. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  235.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  236. #endif   
  237. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  238.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  239. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  240.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  241. #endif   
  242. #ifdef FUNCTION_CALLS 
  243.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  244. #else 
  245.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  246. #endif   
  247.  
  248. #ifdef BY_TWO
  249.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  250.                         (*glColorP)((const GLfloat *) (pvcolor + *startvertindex));
  251.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  && !defined(COLOR4)
  252.                         glColor3fv((const GLfloat *) (pvcolor + *startvertindex));
  253.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS)  &&  defined(COLOR4)
  254.                         glColor4fv((const GLfloat *) (pvcolor + *startvertindex));
  255.   #endif
  256.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  257.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *startvertindex));
  258.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  259.                         glTexCoord2fv((const GLfloat *) (ptexture + *startvertindex));
  260.   #endif
  261.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  262.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *startvertindex));
  263.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  264.                         glNormal3fv((const GLfloat *) (pvnorm + *startvertindex));
  265.   #endif
  266.   #ifdef FUNCTION_CALLS
  267.                         glVertex3fv((const GLfloat *) (pvert + *startvertindex));
  268.   #else
  269.                         (*glVertex3fvP)((const GLfloat *) (pvert + *startvertindex));
  270.   #endif
  271. #endif
  272.  
  273. #ifndef BATCH
  274.                 glEnd();
  275. #endif
  276.         }
  277. #ifdef BATCH
  278.         glEnd();
  279.         }
  280.         glBegin(mode);
  281.         for(leftoveri=leftovercount-1;leftoveri>=0;leftoveri--) {
  282.                 polyi--;
  283.                 numverts = pply[polyi].numverts;
  284.                 vertindex = pply[polyi].index;
  285. #ifdef BY_TWO
  286.         startvertindex = vertindex;
  287. #endif
  288.  
  289. #if    defined(FACET_COLOR) && !defined(FUNCTION_CALLS)
  290.                 (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  291. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  292.                 glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  293. #elif  defined(FACET_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  294.                 glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  295. #endif
  296. #if    defined(FACET_NORM) && !defined(FUNCTION_CALLS)
  297.                 (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  298. #elif  defined(FACET_NORM) &&  defined(FUNCTION_CALLS)
  299.                 glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  300. #endif
  301. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  302.                     (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  303. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  304.                     glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  305. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  306.                     glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  307. #endif
  308. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  309.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  310. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  311.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  312. #endif
  313. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  314.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  315. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  316.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  317. #endif
  318. #ifdef FUNCTION_CALLS
  319.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  320. #else
  321.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  322. #endif
  323.  
  324. #ifdef BY_TWO
  325.             vertindex++;
  326.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  327.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  328.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  329.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  330.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  331.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  332.   #endif
  333.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  334.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  335.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  336.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  337.   #endif   
  338.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  339.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  340.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  341.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  342.   #endif   
  343.   #ifdef FUNCTION_CALLS 
  344.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  345.   #else 
  346.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  347.   #endif   
  348. #else
  349.             vertindex++;
  350. #endif
  351.  
  352. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  353.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  354. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  355.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  356. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  357.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  358. #endif
  359. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  360.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  361. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  362.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  363. #endif   
  364. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  365.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  366. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  367.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  368. #endif   
  369. #ifdef FUNCTION_CALLS 
  370.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  371. #else 
  372.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  373. #endif  
  374.  
  375. #ifdef BY_TWO
  376.             vertindex++;
  377.  
  378.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  379.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  380.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  381.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  382.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  383.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  384.   #endif
  385.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  386.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  387.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  388.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  389.   #endif   
  390.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  391.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  392.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  393.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  394.   #endif   
  395.   #ifdef FUNCTION_CALLS 
  396.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  397.   #else 
  398.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  399.   #endif   
  400. #else
  401.             vertindex++;
  402. #endif
  403.  
  404.  
  405. #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  406.                         (*glColorP)((const GLfloat *) (pvcolor + *vertindex));
  407. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  408.                         glColor3fv((const GLfloat *) (pvcolor + *vertindex));
  409. #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  410.                         glColor4fv((const GLfloat *) (pvcolor + *vertindex));
  411. #endif
  412. #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)   
  413.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *vertindex));
  414. #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  415.                         glTexCoord2fv((const GLfloat *) (ptexture + *vertindex));
  416. #endif   
  417. #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS) 
  418.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *vertindex));
  419. #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  420.                         glNormal3fv((const GLfloat *) (pvnorm + *vertindex));
  421. #endif   
  422. #ifdef FUNCTION_CALLS 
  423.                         glVertex3fv((const GLfloat *) (pvert + *vertindex));
  424. #else 
  425.                         (*glVertex3fvP)((const GLfloat *) (pvert + *vertindex));
  426. #endif   
  427.  
  428. #ifdef BY_TWO
  429.   #if    defined(VERT_COLOR) && !defined(FUNCTION_CALLS)
  430.                         (*glColorP)((const GLfloat *) (pvcolor + *startvertindex));
  431.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) && !defined(COLOR4)
  432.                         glColor3fv((const GLfloat *) (pvcolor + *startvertindex));
  433.   #elif  defined(VERT_COLOR) &&  defined(FUNCTION_CALLS) &&  defined(COLOR4)
  434.                         glColor4fv((const GLfloat *) (pvcolor + *startvertindex));
  435.   #endif
  436.   #if    defined(TEXTURE) && !defined(FUNCTION_CALLS)
  437.                         (*glTexCoord2fvP)((const GLfloat *) (ptexture + *startvertindex));
  438.   #elif  defined(TEXTURE) &&  defined(FUNCTION_CALLS)
  439.                         glTexCoord2fv((const GLfloat *) (ptexture + *startvertindex));
  440.   #endif
  441.   #if    defined(VERT_NORM) && !defined(FUNCTION_CALLS)
  442.                         (*glNormal3fvP)((const GLfloat *) (pvnorm + *startvertindex));
  443.   #elif  defined(VERT_NORM) &&  defined(FUNCTION_CALLS)
  444.                         glNormal3fv((const GLfloat *) (pvnorm + *startvertindex));
  445.   #endif
  446.   #ifdef FUNCTION_CALLS
  447.                         glVertex3fv((const GLfloat *) (pvert + *startvertindex));
  448.   #else
  449.                         (*glVertex3fvP)((const GLfloat *) (pvert + *startvertindex));
  450.   #endif
  451. #endif
  452.  
  453. }
  454. glEnd();
  455. #endif
  456. }
  457.  
  458.  
  459.  
  460.